﻿namespace EFS.RC.CC.CH.Entities.Surveys
{
	public class Answer : EFS.Common.Serialization.ISerializable
	{
		public System.Int32? ID { get; set; }
		public System.String Text { get; set; }
		public System.Int32? QuestionID { get; set; }
		public System.Int32? Score { get; set; }
		public System.Int32? Priority { get; set; }

		/// Serialize
		public void Serialize(EFS.Common.Serialization.XmlWriter xmlWriter)
		{
			// write
			xmlWriter.Write("ID", ID);
			xmlWriter.Write("Text", Text);
			xmlWriter.Write("QuestionID", QuestionID);
			xmlWriter.Write("Score", Score);
			xmlWriter.Write("Priority", Priority);
		}

		/// Deserialize
		public void Deserialize(EFS.Common.Serialization.XmlReader xmlReader)
		{
			// read
			ID = xmlReader.ReadInt32("ID");
			Text = xmlReader.Read("Text");
			QuestionID = xmlReader.ReadInt32("QuestionID");
			Score = xmlReader.ReadInt32("Score");
			Priority  = xmlReader.ReadInt32("Priority");
		}
	}

}